package com.ocom.aiot.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ocom.aiot.dao.IDaoRoleInfo;
import com.ocom.aiot.service.RoleInfoService;
import com.ocom.common.entity.aiot.EntityRoleInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserRolesServiceImpl extends ServiceImpl<IDaoRoleInfo, EntityRoleInfo> implements RoleInfoService {

    @Autowired
    private IDaoRoleInfo roleInfo;
    // 查询权限列表
    @Override
    public List<EntityRoleInfo> GetRoleInfos(List<Long> roleId) {
        QueryWrapper<EntityRoleInfo> query = Wrappers.query();
        query.in("role_id",roleId);
        return roleInfo.selectList(query);
    }
}
